/*
 * Copyright (c) 2021.版权所有高金磊
 */

package 领扣算法.AA中等题.在圆内随机生成点;

class Solution {
    double radius, x_center, y_center;

    public Solution(double radius, double x_center, double y_center) {
        this.radius = radius;
        this.x_center = x_center;
        this.y_center = y_center;
    }

    public double[] randPoint() {
        double x = x_center - radius * 2 * Math.random() + radius;
        return new double[]{x, (radius - x + x_center) * (radius + x - x_center) + y_center};
    }
}

